<script type="text/javascript">
$(function () {
	var url = '${contextPath}script/oa/communication.js?time=' + sys_get_time();
	$.ajax({url:url, dataType:'script', cache:true,
		success: function(){

		}
	});
});
	$('#editCommunicationForm').find("input:checkbox, input:radio").not('input.ibtn').uniform();
</script>
<#import "/freemarker/modeltype.ftl" as mt>
<div>
	<h3>编辑通讯录</h3>
</div>
<div style="width:400px;float:left;">
	<div height="50">
		<form id="editCommunicationForm">
			<table class="table table-striped">
				<tr><td class="table-left">姓名</td>
					<td><input type="text" id="name" name="name" value="${(commu.name)!''}" />
						<input type="hidden" id="code" name="code" value="${(commu.code)!''}"/>
					</td>
				</tr>
				<tr><td class="table-left">电话</td>
					<td><input id="phone" type="text" name="phone" value="${(commu.phone)!''}"></td>
				</tr>
				<tr style="height:40px;"><td class="table-left">性别</td>
					<td><@mt.ManOrFemale r=true name='sex' d=false mc=false className="formwrapper" value="${(commu.sex)!''}"/></td>
				</tr>
				<tr style="height:40px;"><td class="table-left">类型</td>
					<td><select  name="type" class="uniformselect" style="width:150px;">
							<#if '' != commu.type && commu.type == 1>
								<option value="1">个人</option>
								<option value="2">公共</option>
								<option value="3">公司</option>
							</#if>
							<#if '' != commu.type && commu.type == 2>
								<option value="2">公共</option>
								<option value="3">公司</option>
								<option value="1">个人</option>
							</#if>
							<#if '' != commu.type && commu.type == 3>
								<option value="3">公司</option>
								<option value="1">个人</option>
								<option value="2">公共</option>
							</#if>
							</select></td>
				</tr>
				<tr style="height:40px;"><td class="table-left">电子邮件</td>
					<td><input type="text" id="email" name="email" value="${(commu.email)!''}"></td>
				</tr>
				<tr style="height:40px;"><td class="table-left">生日</td>
					<td><input type="text" id="birthday" name="birthday" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"  rows="5" value="${(commu.birthday?string("yyyy-MM-dd"))!''}"></td>
				</tr>
				<tr style="height:40px;"><td class="table-left">公司名称</td>
					<td><input type="text" id="company" name="company" value="${(commu.company)!''}"></td>
				</tr>
				<tr style="height:40px;"><td class="table-left">地址</td>
					<td><input type="text" id="address" name="address" value="${(commu.address)!''}"></td>
				</tr>
				<tr style="height:40px;"><td colspan="2" style="text-align: center;">
						<a href="#" class="btn btn-info" onclick="javascript:saveCommunication_communication(); return false;">
							<i class="icon-save"></i> &nbsp;保&nbsp;&nbsp;存
						</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="#" class="btn btn-primary" onclick="javascript: history.back(); return false;">
							<i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消
						</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
